package com.fivefu.core.hillstone.dto.request;

import com.fivefu.base.common.utils.str.StrUtils;

/**
 * 组织架构查询实体类
 */
public class OrganizationPageQueryDto {

    /**
     * 必填。要查询组织的惟一编码。查询根组织时不需要填值
     */
    private String id;

    /**
     * 类型(1:组织)
     */
    private Integer nodeType;

    /**
     * 检索类型
     * 组织：01
     * 设备：01;1;ALL
     * 通道：01;0;ALL;ALL
     * 设备和通道：01;1;ALL;ALL
     */
    private String typeCode;

    /**
     * 页号,最小值为1
     */
    private Integer page;

    /**
     * 每页的条数,不超过3000
     */
    private Integer pageSize;

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public Integer getNodeType() {
        return nodeType;
    }

    public void setNodeType(Integer nodeType) {
        this.nodeType = nodeType;
    }

    public String getTypeCode() {
        return typeCode;
    }

    public void setTypeCode(String typeCode) {
        this.typeCode = typeCode;
    }

    public Integer getPage() {
        return page;
    }

    public void setPage(Integer page) {
        this.page = page;
    }

    public Integer getPageSize() {
        return pageSize;
    }

    public void setPageSize(Integer pageSize) {
        this.pageSize = pageSize;
    }

    public String getParam(){
        return "?id=" + StrUtils.isCheckNull(id) + "&nodeType=" + nodeType + "&typeCode=" + StrUtils.isCheckNull(typeCode)
                + "&page=" + page + "&pageSize=" + pageSize;
    }
}
